import { request } from "../utils/axios"
import { PageListReturnResult } from "../utils/types"

export default {
  pageList (params: any): PageListReturnResult {
    return request({
      url: '/framework/api/list',
      params
    })
  },
  save (data: any) {
    return request({
      url: 'framework/api/addApi',
      method: 'POST',
      data
    })
  },
  delete (ids: string) {
    return request({
      url: `/framework/api/${ids}`
    })
  },
  get (id: string) {
    return request({
      url: `/framework/api/${id}`
    })
  },
  test (data: any) {
    return request({
      url: '/framework/api/test',
      method: 'POST',
      data
    })
  }
}
